package com.example.order.model.vo;

import com.example.common.validator.Update;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;

import java.io.Serializable;

@Data
public class OrderVO implements Serializable {
    private Long id;
    //订单
    @NotBlank(groups = {Update.class}, message = "订单号不能为空")
    private String orderNum;
    //商品id
    @NotNull(groups = {Default.class}, message = "商品ID不能为空")
    private Long goodsId;
    //收货地址id
    @NotNull(groups = {Default.class}, message = "收货地址ID不能为空")
    private Long addressId;
    //商品价格
    @DecimalMin(groups = {Default.class}, value = "0.01", message = "商品价格不能低于0.01")
    private Double price;
    //商品优惠价格
    @DecimalMin(groups = {Default.class}, value = "0.01", message = "商品优惠价格不能低于0.01")
    private Double favorablePrice;
    //用户实付金额
    @DecimalMin(groups = {Default.class}, value = "0.01", message = "商品实付金额不能低于0.01")
    private Double payAmount;
}
